-- GENERATED SPELL FOR [Mana Leech] --


function spell0_19306(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(34933,pUnit)
pUnit:RegisterEvent('Sorts_19306', 604, 1)
end

function spell1_19306(pUnit, Event) --@Faerie Fire,n/a--
pUnit:FullCastSpellOnTarget(25602,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19306', 22000, 1)
end

function spell2_19306(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(15785,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19306', 2000, 1)
end

function Sorts_19306(pUnit, Event)
local choix_sorts_19306 = math.random(0, 2)
if choix_sorts_19306 == 0 then
pUnit:RegisterEvent('spell0_19306', 1, 1)
end
if choix_sorts_19306 == 1 then
pUnit:RegisterEvent('spell1_19306', 1, 1)
end
if choix_sorts_19306 == 2 then
pUnit:RegisterEvent('spell2_19306', 1, 1)
end
end

function mob19306_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19306', math.random(1500, 3000), 1)
end

function mob19306_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19306_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19306_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19306, 1, 'mob19306_Action')
RegisterUnitEvent(19306, 2, 'mob19306_Leave')
RegisterUnitEvent(19306, 3, 'mob19306_Kill')
RegisterUnitEvent(19306, 4, 'mob19306_Die')
